<template>
<h2 ref="title">你好</h2>
<button @click="ShowLog">展示h2元素</button>
 <Person ref="ren" />


</template>

<script setup lang="ts">
import Person from "./components/Person.vue";
import { ref } from "vue";
let title = ref()

// 组件标签上拿到的是组件的实例对象
let ren = ref()
const ShowLog =()=>{
  console.log(ren.value);
  
  
}
</script>

<style>
.app{
 border-radius: 10px;
 background-color: #ddd;
}
</style>